package com.czm.art_light.controller;

import com.czm.art_light.constant.ApiRouterConsts;
import com.czm.art_light.param.response.ArtFeedbackTypeRespDto;
import com.czm.art_light.param.response.RestResp;
import com.czm.art_light.service.ArtFeedbackTypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 反馈类型信息 API 控制器
 */
@Tag(name = "反馈类型信息管理", description = "反馈类型信息相关接口")
@RestController
@RequestMapping(ApiRouterConsts.FEEDBACK_TYPE_API_URL_PREFIX)
public class ArtFeedbackTypeController {
    @Autowired
    private ArtFeedbackTypeService artFeedbackTypeService;

    /**
     * 返回所有的反馈类型内容
     */
    @Operation(summary = "获取所有的反馈类型内容")
    @GetMapping("/all")
    public RestResp<List<ArtFeedbackTypeRespDto>> getAllFeedbackTypes() {
        List<ArtFeedbackTypeRespDto> artFeedbackTypeRespDtoList = artFeedbackTypeService.getAllFeedbackTypes();
        return RestResp.ok(artFeedbackTypeRespDtoList);
    }
}
